package com.wnxy.sddfp.system.config;

import com.wnxy.sddfp.common.utils.JwtTemplate;
import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class JWTConfig {
    @Bean
    public JwtTemplate jwtTemplate(){
        return new JwtTemplate();
    }

    // 消息的转换器，支持发送消息时候传入对象，会自动把对象转换为json格式
    @Bean
    public MessageConverter messageConverter() {
        return new Jackson2JsonMessageConverter();
    }
}